﻿using DevFramework.Core.Infrastructure;
using DevFramework.Business.Abstract;
using DevFramework.Business.Abstract;
using Ninject.Modules;

namespace DevFramework.Business.DependencyResolvers.Ninject
{
    public class ServiceModule : NinjectModule
    {
        public override void Load()
        {
            Bind<IProductService>().ToConstant(WcfProxy<IProductService>.CreateChannel()).InSingletonScope();
            Bind<ICategoryService>().ToConstant(WcfProxy<ICategoryService>.CreateChannel()).InSingletonScope();
            Bind<ILanguageService>().ToConstant(WcfProxy<ILanguageService>.CreateChannel()).InSingletonScope();
            Bind<ILanguageWordService>().ToConstant(WcfProxy<ILanguageWordService>.CreateChannel()).InSingletonScope();
            Bind<IVProductService>().ToConstant(WcfProxy<IVProductService>.CreateChannel()).InSingletonScope();
            Bind<IOrderSalesService>().ToConstant(WcfProxy<IOrderSalesService>.CreateChannel()).InSingletonScope();
            Bind<IUserService>().ToConstant(WcfProxy<IUserService>.CreateChannel()).InSingletonScope();
        }
    }
}